

tiff('Figure3.tiff', width = 8.7, height = 6.5, units = 'cm', pointsize = 6, res = 300)

par(mar = c(1, 3.5, 0, 0))

.xlims <- c(-.35, .32)
.ylims <- c(-1, 8)
.ticks <- seq(-.20, .30, by = 0.10)
.x.vec <- .xlims[1]
.y.vec <- c(7, 6, 4, 3, 1, 0)

.cispread <- .015
.cilwd <- 2
.estlwd <- 2
.estcex <- 1.6
.col.vec <- c('red', 'dodgerblue', 'deepskyblue', 'orange', 'gold3')

.tab <- table3
.text.vec <- c('Waterboarding', 'Close Guantanamo\n   ',
  'Trust Levin', 'Approve of Levin', 'Likely to Vote for Levin',
  'Actually Voted for Levin')

plot(0, type = 'n', bty = 'n', xlim = .xlims, ylim = .ylims,
  xaxt = 'n', yaxt='n', xlab='', ylab='')

# axes
segments(.ticks[-3], .ylims[1], .ticks[-3], .ylims[2], col = 'lightgray', lwd = .5)
segments(0, .ylims[1], 0, .ylims[2], col = 'black', lwd = .5, lty = 3)
segments(.ticks[1], .ylims[1], tail(.ticks, 1), .ylims[1])
segments(.ticks[1], .ylims[2], tail(.ticks, 1), .ylims[2])

# ticks
segments(.ticks, .ylims[2] - .03, .ticks, .ylims[2] + .03)
segments(.ticks, .ylims[1] - .03, .ticks, .ylims[1] + .03)

# Confidence intervals
segments(.tab$q025, .y.vec, .tab$CACE - .cispread, .y.vec, col = .col.vec, lwd = .cilwd)
segments(.tab$CACE + .cispread, .y.vec, .tab$q975, .y.vec, col = .col.vec, lwd = .cilwd)

# point estimates
points(.tab$CACE, .y.vec, pch = 21, bg = .col.vec, cex = .estcex, lwd = .estlwd, col = .col.vec)

# labels
text(.x.vec, .y.vec, .text.vec, xpd = TRUE, cex = 1)
#text(rep(.37, 6), .y.vec, paste('N =', .tab$N), xpd = TRUE, cex = 1, font = 3)
text(.x.vec, .y.vec[1] + .7, 'Substantive', xpd = TRUE, cex = 1, font = 2)
text(.x.vec, .y.vec[3] + .7, 'Attributional', xpd = TRUE, cex = 1, font = 2)
text(.x.vec, .y.vec[5] + .7, 'Behavioral', xpd = TRUE, cex = 1, font = 2)
text(.x.vec, .y.vec[2] - .25, '(not discussed)', font = 3, xpd = TRUE, cex = 1)
text(c(-.2, 0, .2), .ylims[1] - .35, c('-20%',  '0%',  '20%'),
  cex = 1, xpd = TRUE)
text(.05, .ylims[1] - 1.5, 'Complier Average Causal Effect Estimates\nwith 95% Confidence Intervals', xpd = TRUE)
mtext('Figure 3. Persuasion Effects for Senator Levin', 3, 1, font = 2)
dev.off()
